/*
 * Project:     My Project Work, Copyright (C) 2011
 * Created at:  03.08.2011
 */
package de.myprojectwork;

import de.myprojectwork.common.util.MyProjectWorkException;
import de.myprojectwork.model.DataDefinitionModel;
import de.myprojectwork.model.DataDefinitionModelImpl;
import de.myprojectwork.model.DataManipulationModel;
import de.myprojectwork.model.DataManipulationModelImpl;
import de.myprojectwork.presenter.DbToolPresenter;
import de.myprojectwork.presenter.DbToolPresenterImpl;
import de.myprojectwork.presenter.MainPresenter;
import de.myprojectwork.presenter.MainPresenterImpl;
import de.myprojectwork.presenter.TodoPresenter;
import de.myprojectwork.presenter.TodoPresenterImpl;
import de.myprojectwork.view.DbToolView;
import de.myprojectwork.view.DbToolViewImpl;
import de.myprojectwork.view.MainFrame;
import de.myprojectwork.view.MainFrameImpl;
import de.myprojectwork.view.TodoView;
import de.myprojectwork.view.TodoViewImpl;

/**
 * Startet die Anwendung.
 * 
 * @author Chris Holdschuh
 */
public class AppStart {
    
    public static void main(String[] args) throws MyProjectWorkException {
        
        // DB-Tool
        DataDefinitionModel dataDefinitionModel = new DataDefinitionModelImpl();
        DataManipulationModel dataManipulationModel = new DataManipulationModelImpl();
        DbToolPresenter dbToolPresenter = new DbToolPresenterImpl(dataDefinitionModel, dataManipulationModel);
        DbToolView dbToolView = new DbToolViewImpl(dbToolPresenter);
        dbToolPresenter.setView(dbToolView);
        //dbToolPresenter.initUi();
        
        
        // MainFrame
        MainPresenter mainPresenter = new MainPresenterImpl(new DataManipulationModelImpl());
        MainFrame mainView = new MainFrameImpl();
        mainPresenter.setView(mainView);
        mainPresenter.initUi();
        
        // Todo-View
        TodoPresenter todoPresenter = new TodoPresenterImpl(new DataManipulationModelImpl());
        TodoView todoView = new TodoViewImpl(todoPresenter);
        todoPresenter.setView(todoView);
        //todoPresenter.intiUi();
    }
}
